<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateNewDevelopmentsTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('new_developments', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title', 191)->nullable()->comment("标题");
            $table->string('author', 191)->nullable()->comment("作者");
            $table->text('pic');
            $table->integer('read_num')->default(0)->comment("阅读量");
            $table->integer('like_num')->default(0)->comment("点赞数");
            $table->text('content')->nullable()->comment("内容");
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('new_developments');
    }
}
